package com.king.modules.system.controller.common;

import java.util.ArrayList;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.king.framework.base.domain.vo.AjaxResult;

@RestController
public class TempController {




	@GetMapping("/menuClickRecord/curUser")
	public AjaxResult menuClickRecordCurUser(HttpServletRequest request) {
		AjaxResult result = AjaxResult.success();
		result.put("datas", new ArrayList<>());
		return result;
	}

	@PostMapping("/menuClickRecord/addRecord")
	public AjaxResult menuClickRecordAddRecord(HttpServletRequest request) {
		AjaxResult result = AjaxResult.success();
		result.put("datas", new ArrayList<>());
		return result;
	}

	@PostMapping("/message/query")
	public AjaxResult messageQuery(HttpServletRequest request) {
		AjaxResult result = AjaxResult.success();
		result.put("datas", new ArrayList<>());
		result.put("total", 0);
		result.put("totalCount", 0);
		return result;
	}
	
	@GetMapping("/auth/buttons")
	public AjaxResult authButtons(HttpServletRequest request) {
		JSONObject obj = JSON.parseObject("{\"useProTable\":[\"add\",\"batchAdd\",\"export\",\"batchDelete\",\"status\"],\"authButton\":[\"add\",\"edit\",\"delete\",\"import\",\"export\"]}");
		return AjaxResult.success(obj);
	}
	
	@RequestMapping("/user/list")
	public JSONObject userList(HttpServletRequest request) {
		return JSON.parseObject("{\"code\":200,\"msg\":\"成功\",\"data\":{\"rows\":[{\"id\":\"317014828647575901\",\"username\":\"邹敏\",\"gender\":1,\"user\":{\"detail\":{\"age\":29}},\"idCard\":\"317014828647575901\",\"email\":\"o.okbvfsu@mbbxw.bj\",\"address\":\"贵州省 遵义市\",\"createTime\":\"1987-03-02 17:02:31\",\"status\":1,\"avatar\":\"https://i.imgtg.com/2023/01/16/QRqMK.jpg\"},{\"id\":\"747135735365685699\",\"username\":\"唐平\",\"gender\":1,\"user\":{\"detail\":{\"age\":24}},\"idCard\":\"747135735365685699\",\"email\":\"d.kusclkldw@syx.pm\",\"address\":\"甘肃省 天水市\",\"createTime\":\"2023-01-30 13:23:44\",\"status\":1,\"avatar\":\"https://i.imgtg.com/2023/01/16/QRa0s.jpg\"},{\"id\":\"213353743288274537\",\"username\":\"雷娟\",\"gender\":1,\"user\":{\"detail\":{\"age\":21}},\"idCard\":\"213353743288274537\",\"email\":\"i.omgxxqaxes@cbc.vc\",\"address\":\"江西省 南昌市\",\"createTime\":\"1983-02-22 13:43:41\",\"status\":1,\"avatar\":\"https://i.imgtg.com/2023/01/16/QRa0s.jpg\"},{\"id\":\"693819049545228414\",\"username\":\"秦明\",\"gender\":1,\"user\":{\"detail\":{\"age\":25}},\"idCard\":\"693819049545228414\",\"email\":\"d.csrioxlkus@vnupt.ky\",\"address\":\"福建省 龙岩市\",\"createTime\":\"1996-07-31 22:42:54\",\"status\":0,\"avatar\":\"https://i.imgtg.com/2023/01/16/QRqMK.jpg\"},{\"id\":\"419215220391772758\",\"username\":\"胡刚\",\"gender\":2,\"user\":{\"detail\":{\"age\":20}},\"idCard\":\"419215220391772758\",\"email\":\"h.zjicclclc@tmepftuly.li\",\"address\":\"四川省 广元市\",\"createTime\":\"2009-01-07 07:01:07\",\"status\":1,\"avatar\":\"https://i.imgtg.com/2023/01/16/QRBHS.jpg\"},{\"id\":\"627468767535196674\",\"username\":\"沈洋\",\"gender\":1,\"user\":{\"detail\":{\"age\":20}},\"idCard\":\"627468767535196674\",\"email\":\"j.ibde@gbx.aero\",\"address\":\"广东省 佛山市\",\"createTime\":\"2002-01-25 02:56:58\",\"status\":1,\"avatar\":\"https://i.imgtg.com/2023/01/16/QR57a.jpg\"},{\"id\":\"849617778816627898\",\"username\":\"任桂英\",\"gender\":2,\"user\":{\"detail\":{\"age\":20}},\"idCard\":\"849617778816627898\",\"email\":\"g.tvexcfkp@fqrksu.bw\",\"address\":\"广东省 湛江市\",\"createTime\":\"1990-06-20 14:51:55\",\"status\":0,\"avatar\":\"https://i.imgtg.com/2023/01/16/QRqMK.jpg\"},{\"id\":\"135755248662268462\",\"username\":\"江秀兰\",\"gender\":2,\"user\":{\"detail\":{\"age\":22}},\"idCard\":\"135755248662268462\",\"email\":\"i.xyaxvq@etqyrrzdbt.fj\",\"address\":\"辽宁省 沈阳市\",\"createTime\":\"2002-03-18 11:35:09\",\"status\":0,\"avatar\":\"https://i.imgtg.com/2023/01/16/QR57a.jpg\"},{\"id\":\"127621673717625225\",\"username\":\"熊明\",\"gender\":2,\"user\":{\"detail\":{\"age\":28}},\"idCard\":\"127621673717625225\",\"email\":\"y.ckjroophb@pctcsolbe.ag\",\"address\":\"江苏省 宿迁市\",\"createTime\":\"2018-10-18 03:56:31\",\"status\":1,\"avatar\":\"https://i.imgtg.com/2023/01/16/QRa0s.jpg\"},{\"id\":\"876800550372853716\",\"username\":\"廖超\",\"gender\":1,\"user\":{\"detail\":{\"age\":30}},\"idCard\":\"876800550372853716\",\"email\":\"y.fjwifu@obyt.az\",\"address\":\"澳门特别行政区 离岛\",\"createTime\":\"2021-07-11 05:19:07\",\"status\":0,\"avatar\":\"https://i.imgtg.com/2023/01/16/QRqMK.jpg\"}],\"pageNum\":1,\"pageSize\":10,\"total\":2000}}");
	}
	
	@RequestMapping("/user/gender")
	public JSONObject userGender(HttpServletRequest request) {
		return JSON.parseObject("{\"code\":200,\"data\":[{\"genderLabel\":\"男\",\"genderValue\":1},{\"genderLabel\":\"女\",\"genderValue\":2}],\"msg\":\"成功\"}");
	}
	
	
	@RequestMapping("/user/status")
	public JSONObject userStatus(HttpServletRequest request) {
		return JSON.parseObject("{\"code\":200,\"data\":[{\"userLabel\":\"启用\",\"userStatus\":1},{\"userLabel\":\"禁用\",\"userStatus\":0}],\"msg\":\"成功\"}");
	}

//	@GetMapping("/user/get/{uuid}")
//	public AjaxResult enumdataGetEnumData(HttpServletRequest request, @PathVariable("uuid") String uuid) {
//		AjaxResult result = AjaxResult.success();
//		Map<String, Object> datas = new HashMap<>();
//		datas.put("email", "9090@qq.com");
//		datas.put("mphone", "136803589989");
//		datas.put("memos", "");
//		datas.put("sex", "1");
//		datas.put("username", "king");
//		datas.put("usercode", "king");
//
//		Map<String, Object> senum = new HashMap<>();
//
//		Map<String, Object> sex = new HashMap<>();
//		sex.put("codes", "1");
//		sex.put("names", "男");
//		senum.put("sex", sex);
//		datas.put("senum", senum);
//
//		Map<String, Object> orgMap = new HashMap<>();
//		orgMap.put("uuid", "orgid001");
//		orgMap.put("nodename", "默认机构");
//		datas.put("orgvo", orgMap);
//		result.put("datas", datas);
//		return result;
//	}
	
	
}
